export class ConfigJsonBase {

    public static configList: Array<any> = []

    public static getConfigByKeyValue(key: string, value:any) {
        for (let i = 0; i < this.configList.length; i++) {
            let obj = this.configList[i]
            if(obj[key] == value){
                return obj
            }
        }
    }

    public static getConfigListByKeyValue(key: string, value:any){
        let result:Array<any> = []
        for (let i = 0; i < this.configList.length; i++) {
            let obj = this.configList[i]
            if(obj[key] == value){
                result.push(obj)
            }
        }
        return result
    }

    public static getConfigListByKey1Key2(key1:string, value1:any, key2:string, value2:any){
        let result:Array<any> = []
        for (let i = 0; i < this.configList.length; i++) {
            let obj = this.configList[i]
            if(obj[key1] == value1 && obj[key2] == value2){
                result.push(obj)
            }
        }
        return result
    }

}